<?php
	
	session_start(); // start session cookies
	require("Login.class.php"); // pull in file
	$login = new Login; // create object login
	
	$login->authorize(); // make user login
	?>
<!--
	=================================================================================================
	Copyright (c) 2012 Athena Health. 
	This software is the proprietary information of Athena Health
	All Right Reserved.
	Repository path:    $HeadURL: http://athena-call-routing.googlecode.com/svn/trunk/admin/update_ac.php $
	Last committed:     $Revision: 45 $
	Last changed by:    $Author: davidjmorin@gmail.com $
	Last changed date:    $Date: 2012-07-02 21:10:12 -0400 (Mon, 02 Jul 2012) $
	ID:            $Id: index.php 45 2012-07-03 01:10:12Z davidjmorin@gmail.com $
	=================================================================================================
-->



<style type="text/css">
	body {background-color:#42520e; color: #f0cb01;
	
	}
	th {background: URL(http://www.athenahealth.com/_img/boxes/carousel_bg.png);}
	p {color:blue;}
	a:link {color: #f0cb01; text-decoration: underline; }
	a:active {color: #f0cb01; text-decoration: underline; }
	a:visited {color: #f0cb01; text-decoration: underline; }
	a:hover {color: #f0cb01; text-decoration: none; }
</style>

<?php
	$keyword = $_POST['keyword'];
	$phone = $_POST['phone'];
	$reason = $_POST['reason'];
	$block = $_POST['block'];
	$block = $_POST['block'];
	define("HOST", "localhost");
	
	
	// Database user
	define("DBUSER", "root");
	
	// Database password
	define("PASS", "123456");
	
	// Database name
	define("DB", "bbpinpal_article");
	
	############## Make the mysql connection ###########
	
	$conn = mysql_connect(HOST, DBUSER, PASS) or  die('Could not connect !<br />Please contact the site\'s administrator.');
	
	$db = mysql_select_db(DB) or  die('Could not connect to database !<br />Please contact the site\'s administrator.');
	
	mysql_query("UPDATE athena SET keyword='$keyword', block='$block', phone='$phone', Reason='$reason' WHERE keyword='$keyword'") or die (mysql_error());  
	mysql_query("DELETE FROM athena WHERE keyword=''");
?>
<table>
	<tr><td valign="top"><br /><br />
	<img src="http://a0.twimg.com/profile_images/1138695863/twitter-icon.png" width="100px"></td>
	<td>	
		<table>  <tr><b>Data Updated Successfully</b></tr>       
			<tr><td>  Keyword:  </td><td><? echo $keyword; ?><br></td></tr>
			<tr><td> Block?: </td><td><? echo $block; ?><br></td></tr>
			<tr><td> Phone #:</td><td><? echo $phone; ?><br> </td></tr>
			<tr><td> Reason: </td><td><? echo $reason; ?></td></tr>
			
		</table>
	</form>
	</td></tr>
</table>

<a href="./">Go Back</a>


